LassoScript Utility
Basics Browse Detail

[Null->FreezeType]

Tag Link [Null->FreezeType] Category Tags
Type Member Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Null->FreezeType] freezes the type of a value so it cannot be modified. An error is thrown if a subsequent tag attempts to change the type of the value.

This tag can be used to force a variable to contain only a value of a given type. Attempts to set the variable to a value of a different type will result in an error if the value cannot be coerced to the frozen type.

Member tags for Null can be used on values of any data type including custom, third party data types.

Syntax

[Value->FreezeType]

Parameters

No Parameters Required.

Examples

To freeze the type of a variable:

Use the [Null->FreezeType] tag. The following example shows how to freeze a variable so it can only contain values of type String.

[Variable: 'theVariable'='Hello World']
[($theVariable)->FreezeType]